<?php
class Http {
	public function getPost() {
		$sPost = file_get_contents ( 'php://input', 'r' );
		$aPost = preg_split ( '/(&|&amp;)/', $sPost );
		foreach ( $aPost as $iKey => $sPost ) {
			unset ( $aPost [$iKey] );
			list ( $sKey, $sValue ) = explode ( '=', $sPost );
			$sKey = urldecode ( $sKey );
			$sValue = urldecode ( $sValue );
			$aPost [$sKey] = $sValue;
		}
		return $aPost;
	}
}